package day1122_2;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

public class C1 {
    public static void main(String[] args) throws ClassNotFoundException, SQLException {
        Class.forName("com.mysql.cj.jdbc.Driver");//1.加载Driver类  (com.mysql.cj.jdbc)
        Connection  conn= DriverManager.getConnection(
                "jdbc:mysql://localhost:3306/mysql?serverTimezone=GMT%2B8&useSSL=false",
                "root","root");
        Statement  stmt = conn.createStatement();//3.获取执行对象
        // create   database    名  ;
        stmt.execute("create database big21122");//4.执行sql
        System.out.println(conn);

        conn.close();//3.关闭链接
    }



}
